Publish Topic

 

To receive events for Salesforce changes associated with a topic, you must create the topic, if it does not exist. When you create a topic, the connector creates a PushTopic, which is a special object in Salesforce that binds a name (in this case, the topic’s name) and a Salesforce Object Query Language (SOQL) query together. After you create a topic, you can subscribe and publish topic by it name.

Prerequisites:

  • Installing salesforce connector(by login into anypoint exchange from studio you can install the salesfoce conenctor)
  • Salesforce developer account
  • Security token
  • Consumer key and secret(If you are using the Salesforce connector to access an OAuth API, you also need a consumer key and secret)

Create project in anypoint studio

Drag and drop Salesforce Publish Topic Operation from mule palette

 

Publish Topic

 

Configure the connection details for salesforce and use the Basic Username and Password connection(Username,Password,Securitytoken),you can also use other connections as well to do the configuration like Oauth UserName and Password etc

Publish Topic

 

Configure Topic name, Query

Publish Topic

 

Deploy the appliction and test using listener

Topic is created in salesforce.

In next tutorial I will demonstrate how to subscribe the topic that has been created as part of this tutorial

Sample application: publishtopicinsalesforce sample

 

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments